/** 
 * Returns all RL items from |chrome.storage.sync|
 * 
 */
function getReadingList(){
    var readingList = [];
	
    /* Gets all RL items from storage, puts them in local |readingList|  */
    chrome.storage.sync.get(null, function(items){
	var iHTML = "<div class='section group'>";
	var x = 0;
	
	for (var i in items){
	    
	    if(x > 5) {
		x = 0;
		iHTML += "</div><div class='section group'>";
	    }
	    
	    iHTML += "<div class='col span_1_of_6'><a href='" + items[i].url +
		"'><img src='chromium.png'/>" + items[i].title + "</div>";
	    
	    console.log(items[i]);
	    x++;
	}
	iHTML = iHTML + "</div></div></div></div>";
	document.getElementById("sec").innerHTML += iHTML;
    });
}

getReadingList();
